package com.ruoyi.user.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 服务评价对象 service_evaluate
 * 
 * @author xiajiale
 * @date 2024-09-14
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ServiceEvaluate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @TableId
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户姓名 */
    @Excel(name = "用户姓名")
    private String username;

    /** 用户头像 */
    @Excel(name = "用户头像")
    private String avatar;

    /** 店铺编号 */
    @Excel(name = "店铺编号")
    private Long mid;

    /** 店铺名称 */
    @Excel(name = "店铺名称")
    private String name;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderId;

    /** 服务类别编号 */
    @Excel(name = "服务类别编号")
    private String serviceId;

    /** 服务类型名称 */
    @Excel(name = "服务类型名称")
    private String servicename;

    /** 星级 */
    @Excel(name = "星级")
    private Long rate;

    /** 评价图片【集合图片】 */
    @Excel(name = "评价图片【集合图片】")
    private String imgs;

    /** 评价内容 */
    @Excel(name = "评价内容")
    private String content;

    /** 评价时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Field(type = FieldType.Date, name = "create_time",format = {},
            pattern = "yyyy-MM-dd HH:mm:ss || yyyy-MM-dd'T'HH:mm:ss'+08:00' || strict_date_optional_time || epoch_millis")
    @Excel(name = "评价时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    /** 删除状态 */
    @TableLogic
    private Long deleted;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setMid(Long mid) 
    {
        this.mid = mid;
    }

    public Long getMid() 
    {
        return mid;
    }
    public void setOrderId(String orderId) 
    {
        this.orderId = orderId;
    }

    public String getOrderId() 
    {
        return orderId;
    }
    public void setServiceId(String serviceId) 
    {
        this.serviceId = serviceId;
    }

    public String getServiceId() 
    {
        return serviceId;
    }
    public void setRate(Long rate) 
    {
        this.rate = rate;
    }

    public Long getRate() 
    {
        return rate;
    }
    public void setImgs(String imgs) 
    {
        this.imgs = imgs;
    }

    public String getImgs() 
    {
        return imgs;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setTime(Date time) 
    {
        this.time = time;
    }

    public Date getTime() 
    {
        return time;
    }
    public void setDeleted(Long deleted) 
    {
        this.deleted = deleted;
    }

    public Long getDeleted() 
    {
        return deleted;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("mid", getMid())
            .append("orderId", getOrderId())
            .append("serviceId", getServiceId())
            .append("rate", getRate())
            .append("imgs", getImgs())
            .append("content", getContent())
            .append("time", getTime())
            .append("deleted", getDeleted())
            .toString();
    }
}
